<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father{
            width: 100px;
            height: 100px;
            background-color: pink;
        }
        .son{
            width: 50px;
            height: 50px;
            background-color: royalblue;
        }
    </style>
</head>
<body>

    <div class="father">
        <div class="son"></div>
    </div>
    <script>
        //mouseenter 鼠标事件，当鼠标移动到元素上时就会触发  不会冒泡
        var father = document.querySelector('.father');
        var son = document.querySelector('.son');
        father.addEventListener('mouseenter',function(){
            console.log(111);
        })
    </script>
</body>
</html>